package cn.edu.zzuli.nothinglink.mapper;

import cn.edu.zzuli.nothinglink.entity.LiveRecord;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Update;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author suzyyy
 * @since 2021-04-08
 */
public interface LiveRecordMapper extends BaseMapper<LiveRecord> {

    @Update("UPDATE live_record l SET l.live_sign_number =  l.live_sign_number + 1 " +
            "WHERE l.record_id = #{recordId}")
    boolean increaseSignNumber(Integer recordId);

    @Update("UPDATE live_record l SET l.live_problem_number =  l.live_problem_number + 1 " +
            "WHERE l.record_id = #{recordId}")
    boolean increaseProblemNumber(Integer recordId);
}
